/**
 * @file store_partition_eeprom.h
 * @brief
 *
 * @author morris (a_morris@163.com)
 * @version v0.0.1
 * @date 2023-08-02
 *
 *
 * @htmlonly <span style="font-weight: bold">History</span> @endhtmlonly
 *
 * Version|Describe|Auther|Date|comment
 * ------|------|------|------|------
 * v0.0.1|create file|morris|2023-08-02|create file
 *
 *
 * @copyright <h2><center>Copyright &copy; 2023 All Rights Reserved.</center></h2>
 */

#ifndef _STORE_PARTITION_EEPROM_H_
#define _STORE_PARTITION_EEPROM_H_

#ifdef __cplusplus
extern "C"
{
#endif

    /**
     * @brief eeprom, 24C64, 8Kbyte
     *
     *  +--------+------+-------------------+
     *  | offset | size |       info        |
     *  +--------+------+-------------------+
     *  |   0    | 256  |   sysinfo         |
     *  +--------+------+-------------------+
     *  |  256   | 256  |   operation       |
     *  +--------+------+-------------------+
     *  |  1024  | 256  |   record table    |
     *  +--------+------+-------------------+
     *  |  2048  | -    |   record data     |
     *  +--------+------+-------------------+
     */

#define STORE_INFO_ADDRESS_BASE        (0U)    /* 单元信息存储eeprom地址 */
#define STORE_OPERATION_ADDRESS_BASE   (256U)  /* 单元运行信息eeprom地址 */
#define STORE_RECORD_HEAD_ADDRESS_BASE (1024U) /* 事件记录表映射信息eeprom地址 */
#define STORE_RECORD_DATA_ADDRESS_BASE (2048U) /* 事件记录存储eeprom地址 */
#define STORE_RECORD_NUMBER_MAX        (65U)   /* 事件记录最大条数 */

#ifdef __cplusplus
}
#endif

#endif /* _STORE_PARTITION_EEPROM_H_ */
